package cn.richx.pushmessage.web.rest;

import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestTemplate;

/**
 * @author caohao
 * @date 2018-04-25
 */
public class Main {

    /*public static void main(String[] args) {
        RestTemplate restTemplate = new RestTemplate();

        String url = "http://192.168.0.247:7080/uaa/api/register";
        String json = "{\"phone\": \"15002897962\", \"captcha\": \"1111\", \"password\": \"123456\"}";
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_JSON);
        headers.set("X-BaseID", "111");
        HttpEntity<String> entity = new HttpEntity<String>(json, headers);

        System.out.println(restTemplate.postForObject(url, entity, String.class));
    }*/
}
